#ifndef VIEWEDITOR_H
#define VIEWEDITOR_H
#include "View.h"
#include "glwindow.h"
#include "rendermanager.h"
#include "toolinvoker.h"
#include "globalstates.h"
#include "GameEngine.h"

#define SCREEN_OFFSET 40
#define ARROW_OFF 15

class ViewEditor : public virtual View
{
    bool shiftUp, shiftDown, shiftLeft, shiftRight, mousePresent, timerActive,startDrag;
    int timerID;

    float tbPrevX, tbPrevY;
    float shiftX, shiftY;

    ViewEditor();
    RenderManager* rend;
    ToolInvoker *mainTool;
    GlobalStates* globals;
    GameEngine* ge;

public:
    static View* getInstance();
    void display();
    void overlayDisplay();
    void init();
    void destroy();
    void resize(int width, int height);
    Result mousePressEvent(QMouseEvent *event);
    Result mouseMoveEvent(QMouseEvent *event);
    Result mouseReleaseEvent(QMouseEvent *event);
    Result mouseEnterEvent(QEvent *event);
    Result mouseLeaveEvent(QEvent *event);
    Result keyPressEvent(QKeyEvent *event);
    Result keyReleaseEvent(QKeyEvent *event);
    Result mouseWheelEvent(QWheelEvent *event);
    void timerEvent(QTimerEvent *event);
    void rotHandler(float x, float y);
    void resetRot(float x, float y);
};

#endif // VIEWEDITOR_H
